package com.kfm.base.io.o;

import java.io.Serializable;

public class Student implements Serializable {

    private String name;

    private double score;

    private int age;

    private String gender;

    private Student friend;

    public Student(){}
    public Student(String name, double score, String gender) {
        System.out.println("init<>");
        this.name = name;
        this.score = score;
        this.gender = gender;
    }



    public void setFriend(Student friend) {
        this.friend = friend;
    }

    public Student getFriend() {
        return friend;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", score=" + score +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                ", friend=" + friend +
                '}';
    }
}
